while ((line = readline())) {
  handleLine(line)
}

function handleLine(string) {
  let [f, s] = string.split(' ')
  let r = f + s
  let evenArr = []
  let oddArr = []
  let i1 = 0
  while (i1 !== r.length) {
    i1 % 2 === 0 ? evenArr.push(r[i1]) : oddArr.push(r[i1])
    i1++
  }

  evenArr.sort((a, b) => a.codePointAt() - b.codePointAt())
  oddArr.sort((a, b) => a.codePointAt() - b.codePointAt())
  let result = ''
  let i2 = 0
  while (i2 !== r.length) {
    result += i2 % 2 === 0 ? evenArr.shift() : oddArr.shift()
    i2++
  }
  let i3 = 0
  let last = ''
  while (i3 !== result.length) {
    let cur = result[i3]
    if (cur > 'f' || (cur > 'F' && cur < 'a')) {
      last += cur
    } else {
      let temp = [...parseInt(cur, 16).toString(2).padStart(4, '0')]
        .reverse()
        .join('')
      last += parseInt(temp, 2).toString(16).toUpperCase()
    }
    i3++
  }
  console.log(last)
}
